package start;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

import java.util.Properties;

public class Test01 {
    public Test01() {
        try {
            Class.forName("com.mysql.jdbc.Driver");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        Connection con = null;
        try {
            con = (Connection) DriverManager.getConnection("jdbc:mysql://192.168.1.101:3306/test","root", "2348");
        } catch (SQLException e) {
            e.printStackTrace();
        }
        System.out.println("Connection: " + con);
        Statement stmt = null;
        try {
            stmt = (Statement) con.createStatement();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        try {
            stmt.close();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        try {
            con.close();
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}
